package huadi.concurrent.atomicclear;

/**
 * Created with IntelliJ IDEA.
 *
 * @author zhufeng
 *         Date: 12-7-17
 *         Time: 下午7:03
 *         To change this template use File | Settings | File Templates.
 */
public class Runner extends Thread {
    private AtomicClear ac;

    public Runner(AtomicClear ac) {
        this.ac = ac;
    }

    @Override
    public void run() {
        while (true) {
            ac.incrementAndClear();
            System.out.println(ac.get());
        }
    }
}
